<%@ page import="com.ama.utils.SpringUtils" %>
<%@ page import="com.ama.utils.DateUtil" %>
<%@ page import="com.ama.service.PropertyService" %>
<%@ page import="com.ama.service.RoomService" %>
<%@ page import="com.ama.service.BuildService" %>
<%@ page import="com.ama.service.EstateService" %>
<%@ page import="com.ama.service.impl.*" %>
<%@ page import="com.ama.pojo.*" %>
<%@ page import="com.ama.dao.CostDao" %>
<%@ page import="com.ama.utils.NumberUtils" %>
<%@ page import="com.ama.dao.StaffDao" %>

<%--  Created by IntelliJ IDEA.--%>
<%--  User: zez--%>
<%--  Date: 2020/12/23--%>
<%--  Time: 14:47--%>
<%--  To change this template use File | Settings | File Templates.--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>个人信息 </title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/materialdesignicons.min.css" rel="stylesheet">
<link href="../css/style.min.css" rel="stylesheet">
</head>
  
<body>
<%
  Staff staff = (Staff)session.getAttribute("user");
  StaffDao staffDao = SpringUtils.getBean(StaffDao.class);
  BedServiceImpl bedService = SpringUtils.getBean(BedServiceImpl.class);
  EstateService estateService = SpringUtils.getBean(EstateServiceImpl.class);
  BuildService buildService = SpringUtils.getBean(BuildServiceImpl.class);
  RoomService roomService = SpringUtils.getBean(RoomServiceImpl.class);
  PropertyService propertyService = SpringUtils.getBean(PropertyServiceImpl.class);
  Estate estate = estateService.selectById(staff.getEstateId());
%>

<div class="container-fluid p-t-15">
  
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          <div class="card-header"><h4>个人信息</h4></div>

          <hr>
          <form method="post" action="/updateStaffInfo" class="site-form">

            <div class="row m-b-10">
              <div class="col-lg-6">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">员工号码</button>
                  </span>
                  <input type="text" class="form-control bg-white" name="staffId" readonly value="<%=staff.getStaffId()%>">
                </div>
              </div>

              <div class="col-lg-6">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">员工密码</button>
                  </span>
                  <input type="text" name="password" class="form-control bg-white" readonly value="<%=staff.getStaffPassword()%>">
                </div>
              </div>
            </div>

            <div class="row m-b-10">
              <div class="col-lg-6">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default"  type="button">员工姓名</button>
                  </span>
                  <input type="text" class="form-control bg-white" name="name"  value="<%=staff.getStaffName()%>">
                </div>
              </div>

              <div class="col-lg-6">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default"  type="button">员工性别</button>
                  </span>
                  <input type="text" class="form-control bg-white" name="gender"  value="<%=staff.getGender()%>">
                </div>
              </div>
            </div>

            <div class="row m-b-10">
              <div class="col-lg-6">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default"  type="button">入职部门</button>
                  </span>
                  <input type="text" class="form-control bg-white"  name="department" readonly value="<%=staff.getDepartment()%>">
                </div>
              </div>

              <div class="col-lg-6">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">入行时间</button>
                  </span>
                  <input type="text" class="form-control bg-white" readonly value="<%=DateUtil.dateToStr(staff.getEntrytime())%>">
                </div>
              </div>
            </div>

            <div class="row m-b-10">
              <div class="col-lg-6">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">手机号码</button>
                  </span>
                  <input type="text" class="form-control bg-white" name="phone"  value="<%=staff.getStaffPhone()%>">
                </div>
              </div>

              <div class="col-lg-6">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">员工学历</button>
                  </span>
                  <input type="text" class="form-control bg-white"  name="education" value="<%=staff.getEducation()%>">
                </div>
              </div>
            </div>

            <div class="row m-b-10">
              <div class="col-lg-12">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">身份证号</button>
                  </span>
                  <input type="text" class="form-control bg-white" name="identity"  value="<%=staff.getIdentity()%>">
                </div>
              </div>
            </div>

            <div class="row m-b-10">
              <div class="col-lg-12">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">银行卡号</button>
                  </span>
                  <input type="text" class="form-control bg-white" name="bankcard"  value="<%=staff.getBankcard()%>">
                </div>
              </div>
            </div>

            <div class="row m-b-10">
              <div class="col-lg-12">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">家庭住址</button>
                  </span>
                  <input type="text" class="form-control bg-white" name="address"  value="<%=staff.getStaffAddress()%>">
                </div>
              </div>
            </div>
            <div class="row m-b-10">
              <div class="col-lg-12">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">是否南昌户口</button>
                  </span>
                  <input type="text" class="form-control bg-white" name="hukou"  value="<%=staff.getHukou()%>">
                </div>
              </div>
            </div>

            <div class="row m-b-10">
              <div class="col-lg-12">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">租用小区名称</button>
                  </span>
                  <input type="text" class="form-control bg-white" readonly value="<%if(estate!=null)%><%=estate.getEstateName()%>">
                </div>
              </div>
            </div>

            <div class="row m-b-10">
              <div class="col-lg-12">
                <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="button">婚姻状态</button>
                  </span>
                  <input type="text" class="form-control bg-white" name="marriage"  value="<%=staff.getMarriage()%>">
                </div>
              </div>
            </div>
            <div class="text-center">
              <button type="submit" class="btn btn-primary">保存</button>
            </div>
          </form>
 
        </div>
      </div>
    </div>
    
  </div>
  
</div>

<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/main.min.js"></script>
</body>
</html>